<?php
use think\facade\Route;



Route::group(function () {
    Route::post('login/login', 'index/login');  //登录
});
Route::group(function () {
    //获取用户信息
    Route::get('login/user', 'user/info');     //列表
    Route::get('login/logout', 'index/logout');     //登出
    Route::get('upload/token', 'index/token');     //七牛上传token

    Route::get('qrcode/appQrcode', 'index/appQrcode');     //小程序码

    // 组织
    Route::post('org/add', 'organization/create');   //创建
    Route::get('org/list', 'organization/index');     //列表
    Route::post('org/close', 'organization/close');     //开启或禁用
    Route::get('org/change', 'organization/change');     //组织变更
    Route::post('org/update', 'organization/update');     //组织修改

    //人员
    Route::post('user/add', 'user/create'); //添加
    Route::get('user/list', 'user/index');  //列表
    Route::delete('user/del', 'user/del');    //删除
    Route::post('user/update', 'user/update');    //修改

    //保洁点
    Route::get('cleaningPoint/list', 'cleaningPoint/index');    //列表
    Route::post('cleaningPoint/add', 'cleaningPoint/create');   //添加
    Route::get('cleaningPoint/info', 'cleaningPoint/read');   //详情
    Route::put('cleaningPoint/update', 'cleaningPoint/update');   //修改
    Route::delete('cleaningPoint/del', 'cleaningPoint/del');   //删除
    Route::get('cleaningPoint/cleaningQrcode', 'cleaningPoint/cleaningQrcode');     //打点码
    Route::get('cleaningPoint/inspectionQrcode', 'cleaningPoint/inspectionQrcode');     //巡检码

    //请假
    Route::get('leave/list', 'leave/index');
    Route::post('leave/pass', 'leave/pass');
    Route::get('leave/download', 'leave/download');

    //商城
    Route::get('goods/list', 'goods/index');
    Route::post('goods/add', 'goods/create');
    Route::delete('goods/del', 'goods/del');
    Route::post('goods/update', 'goods/update');

    //积分
    Route::get('integral/list', 'integral/index');
    Route::post('integral/pass', 'integral/pass');

    //视频
    Route::get('video/list', 'video/index');
    Route::delete('video/del', 'video/del');
    Route::post('video/add', 'video/create');
    Route::post('video/update', 'video/update');

    //签到
    Route::get('sign/list', 'sign/index');
    Route::get('sign/download', 'sign/download');

    //签到 new
    Route::get('sign/v2/list', 'sign/signList');
    Route::get('sign/v2/download', 'sign/downloadSignList');
    //报告
    Route::get('userReport/list', 'UserReport/index');
    //商品种类
    Route::post('supplies/add', 'supplies/create');
    Route::post('supplies/update', 'supplies/update');
    Route::delete('supplies/del', 'supplies/del');
    Route::get('supplies/list', 'supplies/index');
    Route::get('supplies/types', 'supplies/type');
    //仓库
    Route::post('warehouse/update', 'warehouse/update');
    Route::get('warehouse/list', 'warehouse/index');
    //申领
    Route::get('apply/list', 'apply/index');

})->middleware('admin');